package com.shuma.auth.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shuma.auth.entity.RestBean;
import com.shuma.auth.model.dto.*;
import com.shuma.auth.model.po.ProductBase;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lele
 * @since 2024-06-17
 */
public interface ProductBaseService extends IService<ProductBase> {

    /**
     * 分页模糊查询商品
     * @param pageParams
     * @param queryProductParamsDto
     * @return
     */
    Page<ProductDto> pageProduct(PageParams pageParams, QueryProductParamsDto queryProductParamsDto,Long userId);

    RestBean<String> tempSaveProduct(AddProductDto addProductDto, Long userId);

    RestBean<String> foreverSaveProduct(AddProductDto addProductDto,Long userId);

    ProductInfoDto selectProductInfoById(Long id,Long userId);

    RestBean<Void> editProduct(ProductInfoDto editProductDto,Long userId);

    RestBean<Void> submitForReview(Long id,Long userId);

    ProductPreviewDto preview(Long id,Long userId);

    RestBean<Void> batchesOnlineProduct(List<Long> ids,Long userId);

    RestBean<Void> batchesOfflineProduct(List<Long> ids,Long userId);

    RestBean<Void> approvedProduct(Long id,Long userId);

    RestBean<Void> refuseProduct(Long id,Long userId);

}
